package com.hardydou.system.mapper;

import com.hardydou.system.model.SystemJob;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


/**
 * @author ：hardy
 * @description：SystemJobMapper
 * @date ：Created in 2020-03-16
 * @Copyright ：Hardydou.com
 */
@Repository
public interface SystemJobMapper {
    int deleteByPrimaryKey(Long jobId);

    int insert(SystemJob record);

    int insertSelective(SystemJob record);

    SystemJob selectByPrimaryKey(Long jobId);

    int updateByPrimaryKeySelective(SystemJob record);

    int updateByPrimaryKey(SystemJob record);

    List<SystemJob> list(Map params);

    int bindToUser(@Param("userId") long userId, @Param("jobIds") long[] jobIds);

    int unBindFromUser(long userId);

    List<SystemJob> selectByUserId(Long userId);

    List<SystemJob> selectAllByUserId(Long userId);
}